#!/usr/bin/env python
# -*- coding: utf-8 -*-

from web.manager.log_manager import LogManager
from web.models.macro_china_gdp import MacroChinaGdp
from web.service.base_service import BaseService

Logger = LogManager.get_logger(__name__)

class MacroChinaGdpService(BaseService):
    """
    MacroChinaGdp的service类
    """

    def find_by_quarter(self, quarter) -> MacroChinaGdp:
        """
        根据quarter查询记录
        """

        return self.macro_china_gdp_dao.find_by_quarter(quarter)

    def batch_insert(self, macro_china_gdp_list):
        """
        批量插入记录
        """

        self.macro_china_gdp_dao.batch_insert(macro_china_gdp_list)